home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / C / MULT_FP.ZIP / MFP.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-16  |  7.3 KB  |  274 lines

  1. /*
  2.  *  MFP.H
  3.  *
  4.  *  Full screen editor and business library header file.
  5.  *
  6.  */
  7.  
  8. /*
  9.  *  Function Key definitions
  10.  */
  11.  
  12. #define FN1         0x0F3B
  13. #define FN2         0x0F3C
  14. #define FN3         0x0F3D
  15. #define FN4         0x0F3E
  16. #define FN5         0x0F3F
  17. #define FN6         0x0F40
  18. #define FN7         0x0F41
  19. #define FN8         0x0F42
  20. #define FN9         0x0F43
  21. #define FN10        0x0F44
  22. #define S_FN1       0x0F54
  23. #define S_FN2       0x0F55
  24. #define S_FN3       0x0F56
  25. #define S_FN4       0x0F57
  26. #define S_FN5       0x0F58
  27. #define S_FN6       0x0F59
  28. #define S_FN7       0x0F5A
  29. #define S_FN8       0x0F5B
  30. #define S_FN9       0x0F5C
  31. #define S_FN10      0x0F5D
  32. #define C_FN1       0x0F5E
  33. #define C_FN2       0x0F5F
  34. #define C_FN3       0x0F60
  35. #define C_FN4       0x0F61
  36. #define C_FN5       0x0F62
  37. #define C_FN6       0x0F63
  38. #define C_FN7       0x0F64
  39. #define C_FN8       0x0F65
  40. #define C_FN9       0x0F66
  41. #define C_FN10      0x0F67
  42. #define A_FN1       0x0F68
  43. #define A_FN2       0x0F69
  44. #define A_FN3       0x0F6A
  45. #define A_FN4       0x0F6B
  46. #define A_FN5       0x0F6C
  47. #define A_FN6       0x0F6D
  48. #define A_FN7       0x0F6E
  49. #define A_FN8       0x0F6F
  50. #define A_FN9       0x0F70
  51. #define A_FN10      0x0F71
  52. #define UPARROW     0x0F48
  53. #define DNARROW     0x0F50
  54. #define LFARROW     0x0F4B
  55. #define RTARROW     0x0F4D
  56. #define C_LFARROW   0x0F73
  57. #define C_RTARROW   0x0F74
  58. #define INSERT      0x0F52
  59. #define DELETE      0x0F53
  60. #define HOME        0x0F47
  61. #define END         0x0F4F
  62. #define PAGEUP      0x0F49
  63. #define PAGEDN      0x0F51
  64. #define C_HOME      0x0F77
  65. #define C_END       0x0F75
  66. #define C_PAGEUP    0x0F84
  67. #define C_PAGEDN    0x0F76
  68. #define ESCAPE      0x001B
  69. #define BACKSPACE   0x0008
  70. #define C_BACKSPACE 0x007F
  71. #define TAB         0x0009
  72. #define S_TAB       0x0F0F
  73. #define ENTER       0x000D
  74. #define C_ENTER     0x000A
  75. #define C_MINUS     0x001F
  76. #define A_MINUS     0x0F82
  77. #define A_EQUAL     0x0F83
  78. #define CTL_A       0x0001
  79. #define CTL_B       0x0002
  80. #define CTL_C       0x0003
  81. #define CTL_D       0x0004
  82. #define CTL_E       0x0005
  83. #define CTL_F       0x0006
  84. #define CTL_G       0x0007
  85. #define CTL_H       0x0008
  86. #define CTL_I       0x0009
  87. #define CTL_J       0x000A
  88. #define CTL_K       0x000B
  89. #define CTL_L       0x000C
  90. #define CTL_M       0x000D
  91. #define CTL_N       0x000E
  92. #define CTL_O       0x000F
  93. #define CTL_P       0x0010
  94. #define CTL_Q       0x0011
  95. #define CTL_R       0x0012
  96. #define CTL_S       0x0013
  97. #define CTL_T       0x0014
  98. #define CTL_U       0x0015
  99. #define CTL_V       0x0016
  100. #define CTL_W       0x0017
  101. #define CTL_X       0x0018
  102. #define CTL_Y       0x0019
  103. #define CTL_Z       0x001A
  104. #define CTL_2       0x0F03
  105. #define CTL_6       0x001E
  106. #define ALT_A       0x0F1E
  107. #define ALT_B       0x0F30
  108. #define ALT_C       0x0F2E
  109. #define ALT_D       0x0F20
  110. #define ALT_E       0x0F12
  111. #define ALT_F       0x0F21
  112. #define ALT_G       0x0F22
  113. #define ALT_H       0x0F23
  114. #define ALT_I       0x0F17
  115. #define ALT_J       0x0F24
  116. #define ALT_K       0x0F25
  117. #define ALT_L       0x0F26
  118. #define ALT_M       0x0F32
  119. #define ALT_N       0x0F31
  120. #define ALT_O       0x0F18
  121. #define ALT_P       0x0F19
  122. #define ALT_Q       0x0F10
  123. #define ALT_R       0x0F13
  124. #define ALT_S       0x0F1F
  125. #define ALT_T       0x0F14
  126. #define ALT_U       0x0F16
  127. #define ALT_V       0x0F2F
  128. #define ALT_W       0x0F11
  129. #define ALT_X       0x0F2D
  130. #define ALT_Y       0x0F15
  131. #define ALT_Z       0x0F26
  132. #define ALT_0       0x0F81
  133. #define ALT_1       0x0F78
  134. #define ALT_2       0x0F79
  135. #define ALT_3       0x0F7A
  136. #define ALT_4       0x0F7B
  137. #define ALT_5       0x0F7C
  138. #define ALT_6       0x0F7D
  139. #define ALT_7       0x0F7E
  140. #define ALT_8       0x0F7F
  141. #define ALT_9       0x0F80
  142.  
  143. #define    BLACK       0   /* dark colors */
  144. #define    BLUE        1
  145. #define    GREEN       2
  146. #define    CYAN        3
  147. #define    RED         4
  148. #define    MAGENTA     5
  149. #define    BROWN       6
  150. #define    LIGHTGRAY   7
  151. #define    DARKGRAY    8   /* light colors */
  152. #define    LIGHTBLUE   9
  153. #define    LIGHTGREEN  10
  154. #define    LIGHTCYAN   11
  155. #define    LIGHTRED    12
  156. #define    LIGHTMAGENTA 13
  157. #define    YELLOW      14
  158. #define    WHITE       15
  159. #define BLINK        16    /* blink bit */
  160. #define REMOVE      -1,-1
  161. #define FALSE    0
  162. #define TRUE    !FALSE
  163. #define BELL()  putch('\007')
  164.  
  165. typedef struct proc
  166. {
  167.     int     keyval;             /* Selection key value          */
  168.     void    (*process)(void);   /* Pointer to process function. */
  169.  
  170. } PROC;
  171.  
  172. typedef struct
  173. {
  174.     void    *variable;      /* Pointer to variable          */
  175.     char    *picture;       /* Picture filter               */
  176.     int     row;            /* row position                 */
  177.     int     column;         /* column position              */
  178.     int     fg;             /* foreground color of field    */
  179.     int     bg;             /* backround color of field     */
  180.     void    (*pre)(void);   /* pointer to pre-process       */
  181.     void    (*post)(void);  /* pointer to post process      */
  182.  
  183. } MFP;
  184.  
  185. typedef struct
  186. {
  187.     int     row;            /* row position                 */
  188.     int     column;         /* column position              */
  189.     char    *text;          /* menu text to display         */
  190.     char    alternate;      /* alternate key selection      */
  191.     char    *help;          /* menu help text line          */
  192.  
  193. } MENU;
  194.  
  195. typedef struct
  196. {
  197.     unsigned ur;
  198.     unsigned uc;
  199.     unsigned lr;
  200.     unsigned lc;
  201.     unsigned char *buffer;
  202.  
  203. } WINDOW;
  204.  
  205. /* Function prototype declarations */
  206.  
  207. void clrscr( void );
  208. void bioputc( char );
  209. void cup( int, int );
  210. void fast(void);
  211. void mfp( MFP **, PROC ** );
  212. void eshow( MFP ** );
  213. void scrswp( char *screenbuff, int mode );
  214. void zero( char *string, int strlen );
  215. void fill( char *buf, int len, char data );
  216. void print( char *string );
  217. void wcls( int leftrow, int leftcol, int rightrow, int rightcol );
  218. void color( int foreground, int background );
  219. void pause(void);
  220. void flush( void );
  221. void brkoff( void );
  222. void brkon( void );
  223. void c_on( void );
  224. void c_off( void );
  225. void c_big( void );
  226. void box( int ulr, int ulc, int lrr, int lrc, int type );
  227. void scrsave( int ticks );
  228. void nosave( void );
  229. void showclok( int row, int col, int fg, int bg );
  230. void noclok( void );
  231. void w_swap( int ulr, int ulc, int lrr, int lrc, int mode, char *buf );
  232. void say( int r, int c, char *s );
  233. void delay( unsigned clicks );
  234.  
  235. char *pic( char *field, char *picture );
  236. char *jul_str( long julian, char *date );
  237. char *ldate( char *date );
  238. char getkey( void );
  239.  
  240. int scrn( char *, char *, PROC ** );
  241. int inkey( void );
  242. int jul_cal(long julian,char *param);
  243. int menu( MENU **, PROC ** );
  244.  
  245. unsigned crc( char *buf, unsigned len );
  246. unsigned getcup( void );
  247.  
  248. long cal_jul(int month,int day,int year);
  249. long time_num( char *time );
  250. long str_jul( char *date );
  251.  
  252. unsigned long crc32( char *buf, unsigned len );
  253.  
  254. WINDOW *window_create( unsigned ur, unsigned uc, unsigned lr, unsigned lc );
  255. void window_kill( WINDOW *window );
  256.  
  257. /* Global Variable Declarations */
  258.  
  259. extern MFP **ed_list;
  260. extern unsigned int editpos;
  261. extern int mfp_update, mfp_valid, mfp_field, mfp_row, mfp_col, mfp_fg, mfp_bg;
  262. extern void *mfp_data;
  263. extern char *mfp_picture;
  264. extern int MENNORMFG;
  265. extern int MENNORMBG;
  266. extern int MENLITEFG;
  267. extern int MENLITEBG;
  268. extern int MENHLPROW;
  269. extern int MENHLPCOL;
  270. extern int MENHLPLEN;
  271. extern int MENHLPFG;
  272. extern int MENHLPBG;
  273. extern int MENSELPOS;
  274.